package com.fxm.controller;

import com.fxm.client.StatisticClient;
import com.fxm.client.VisitClient;
import com.fxm.returns.RespEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 访问量统计 前端控制器
 * </p>
 *
 * @author fxm
 * @since 2021-02-25
 */
@RestController
@RequestMapping("/visit")
@Slf4j
@Api(value = "访问量统计", tags = "访问量统计")
public class VisitController {

    @Autowired
    private VisitClient visitClient;

    @GetMapping("/pv")
    @ApiOperation(value = "日访问量")
    public RespEntity pageView() {
        RespEntity respEntity = visitClient.pageView();
        return respEntity;
    }

}
